from models.base import db


def get_db_session():
    return db.session


def get_update_contents(model_inst, *args) -> dict:
    """model_inst = BaseDBModel"""
    kwargs = {}
    for arg in args:
        kwargs[arg] = getattr(model_inst, arg)
    return kwargs
